<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    215. Kth Largest Element in an Array
   </h1>
   <p>
    Find the
    <strong>
     k
    </strong>
    th largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.
   </p>
   <p>
    <strong>
     Example 1:
    </strong>
   </p>
   <pre>
<strong>Input:</strong> <code>[3,2,1,5,6,4] </code>and k = 2
<strong>Output:</strong> 5
</pre>
   <p>
    <strong>
     Example 2:
    </strong>
   </p>
   <pre>
<strong>Input:</strong> <code>[3,2,3,1,2,4,5,5,6] </code>and k = 4
<strong>Output:</strong> 4</pre>
   <p>
    <strong>
     Note:
    </strong>
    <br>
    You may assume k is always valid, 1 &le; k &le; array's length.
   </p>
  </div>
  <div>
   <h1 class="question_title">
    215. 数组中的第K个最大元素
   </h1>
   <p>
    在未排序的数组中找到第
    <strong>
     k
    </strong>
    个最大的元素。请注意，你需要找的是数组排序后的第 k 个最大的元素，而不是第 k 个不同的元素。
   </p>
   <p>
    <strong>
     示例 1:
    </strong>
   </p>
   <pre><strong>输入:</strong> <code>[3,2,1,5,6,4] 和</code> k = 2
<strong>输出:</strong> 5
</pre>
   <p>
    <strong>
     示例&nbsp;2:
    </strong>
   </p>
   <pre><strong>输入:</strong> <code>[3,2,3,1,2,4,5,5,6] 和</code> k = 4
<strong>输出:</strong> 4</pre>
   <p>
    <strong>
     说明:
    </strong>
   </p>
   <p>
    你可以假设 k 总是有效的，且 1 &le; k &le; 数组的长度。
   </p>
  </div>
 </body>
</html>